<template>
  <div></div>
  <el-button @click="logout()">注销算了</el-button>
</template>

<script setup>
import { computed, getCurrentInstance, onMounted } from "vue-demi";
import { getRouters } from "../api/menu";
import { ElMessageBox } from "element-plus";
import store from "../store/index"
import getters from "../store/getter";
function logout () {
  ElMessageBox.confirm('确定注销并退出系统吗？', '提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    type: 'warning'
  }).then(() => {
    store.dispatch('LogOut').then(() => {
      location.href = '/Login';
    })
  }).catch(() => { });
}

const test1 = onMounted(() => {


})


const props = defineProps({

});


const { proxy } = getCurrentInstance



</script>